<script lang="ts" setup>
   //query=>封装hooks - useRoute仅此而已
    import {useRoute} from 'vue-router'
    import {toRefs} from 'vue'
    const route = useRoute()

    // let {query} = toRefs(route)
    // console.log(query);
    let {params} = toRefs(route)
    
</script>
<template>
    <div>
        <h3>新闻id:{{ params.id }}</h3>
        <h3>新闻title:{{ params.title}}</h3>
        <h3>新闻content:{{ params.content }}</h3>
    </div>
</template>